import request from '@/utils/request'

export default {
  // 分页查询医院设置
  findPageHospSet(current, limit, hospitalSetQueryVo) {
    return request({
      url: `/admin/servicehosp/hospitalSet/findPageHospSet/${current}/${limit}`,
      method: 'post',
      data: hospitalSetQueryVo
    })
  },
  // 获取所有医院设置列表
  getNameListByKeyword(keyword) {
    return request({
      url: `/admin/servicehosp/hospitalSet/getNameListByKeyword/${keyword}`,
      method: 'get'
    })
  },
  // 根据医院名称获取医院编号
  getHosCodeByHosName(hosname) {
    return request({
      url: `/admin/servicehosp/hospitalSet/getHosCodeByHosName/${hosname}`,
      method: 'get'
    })
  },
  // 批量删除
  batchRemoveByIdList(idList) {
    return request({
      url: `/admin/servicehosp/hospitalSet/batchRemoveByIdList`,
      method: 'delete',
      data: idList
    })
  },
  // 根据id删除医院设置
  removeHospById(id) {
    return request({
      url: `/admin/servicehosp/hospitalSet/removeHospById/${id}`,
      method: 'delete'
    })
  },
  // 锁定医院设置状态
  lockHospSet(id, status) {
    return request({
      url: `/admin/servicehosp/hospitalSet/lockHospSet/${id}/${status}`,
      method: 'post'
    })
  },
  // 添加医院设置
  saveHospSet(hospitalSet) {
    return request({
      url: `/admin/servicehosp/hospitalSet/saveHospSet`,
      method: 'post',
      data: hospitalSet
    })
  },
  // 根据id查询医院设置
  getHospSetById(id) {
    return request({
      url: `/admin/servicehosp/hospitalSet/getHospSetById/${id}`,
      method: 'get'
    })
  },
  // 修改医院设置信息
  updateHospSet(hospitalSet) {
    return request({
      url: `/admin/servicehosp/hospitalSet/updateHospSet`,
      method: 'post',
      data: hospitalSet
    })
  }
}
